package listdemo;

public class Test {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);

        //myArrayList.add(10, 19);//报错

        //myArrayList.add(2, 19);
        myArrayList.display();

        System.out.println(myArrayList.contains(3));

        System.out.println(myArrayList.get(1));

        myArrayList.set(10, 99);

        myArrayList.display();
    }
}
